<?php
class NewsletterController extends Zend_Controller_Action
{
	private $_db = null;
	
	public function init(){
		$registry = Zend_Registry::getInstance();
		$this->_db = $registry->get('db');
	}
	
	public function indexAction()
	{
		
	}
	
	public function subscribeAction()
	{
		//$this->_helper->layout->setLayout('layout');
		$this->_helper->layout()->disableLayout();
		Zend_Loader::loadFile("../application/default/models/Tour.php");
		Zend_Loader::loadFile("../application/default/models/Aboutcountry.php");
		Zend_Loader::loadFile("../application/default/models/Newsletter.php");
		
		$sess = new Zend_Session_Namespace('locale');
        $curr_lang = $sess->current_lang;
        
		$mod_nletter = new Newsletter();
		$request = $this->getRequest();
		$nletter_email = $request->getParam('nletter_email');
		$lang = $request->getParam('lang');
		$mod_nletter->subscribeUser($nletter_email, $lang);
	}
}	
?>	